<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>{&SITE_TITLE}</title>
	<link href="__PUBLIC__/admin/css/layout.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
		var ctrl = function(name){
			this.elements = document.getElementsByName('id[]');
			this.length = this.elements.length;
		}
		ctrl.prototype = {
			reverse:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked= !this.elements[i].checked;
				}
			},
			all:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = true;
				}
			},
			unAll:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = false;
				}
			},
			toggle:function(obj){
				this[obj.checked ? 'all' : 'unAll']();
			},
			del:function(id){
				if(id==undefined){
					id = [];
					for(i=0;i<this.length;i++){
						this.elements[i].checked && id.push(this.elements[i].value);
					}
					id = id.join(',');
				}
				location.href = "__URL__/delnode/id/"+id;
			},
			edit:function(id){
				location.href = "__URL__/editnode/id/"+id;
			}
		}
		var c = null;
	</script>
    
	</head>
	<body>
		<div id="container">
			<table class="tableborder" width="100%">
				<tbody>
					<tr class="top">
						<td class="border"></td>
					</tr>
					<tr>
						<th class="header">tips</th>
					</tr>
					<tr>
						<td class="tips">
							<ul>
								<li>ThinkSnS系统后台权限配置 - 菜单管理</li>
							</ul>
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			</table>

			<table class="tableborder" width="100%">
			<form action="__URL__/doeditnode" method="POST">
			<input type="hidden" name="id" value="{$info.id}" >
			<input type="hidden" name="level" value="{$info.level}" >
			<tbody>
<php>if($info['level']=='3'){</php>

					<tr class="top">
						<td class="border" colspan="2"></td>
					</tr>
					<tr>
						<th class="header" colspan="2">添加新操作</th>
					</tr>
					<tr class="label">
						<th>说明</th>
						<th>设置</th>
					</tr>
				

					
					<tr class="cell">
						<td class="altbg1">
							<b>状态:</b>
							<br/>
							<span class="smalltxt">后台显示名</span>
						</td>
						<td class="altbg2" style="padding-left:10px;">
							<select name="state">
								<option value="1" <eq name="info.state" value="1">selected</eq> >开启</option>
								<option value="0" <eq name="info.state" value="0">selected</eq> >关闭</option>
							</select>
						</td>
					</tr>										
					
					<tr class="cell">
						<td class="altbg1" style="width:200px;">
							<b>包含操作:</b>
							<br/>
							<span class="smalltxt">与此操作相关联的操作</span>
						</td>
						<td class="altbg2" align="left">
						
						<ul class="list">
							<li><span>操作名</span><span>中文描述</span><span>默认显示项</span>
<volist id="vo" name="actionlist" key="k">	
							<li><span class="tspan"><input type="text" name="action[]" value="{$vo.name}"></span><span><input type="text" name="description[]" value="{$vo.title}"></span><span>
<php>if($vo['name']==$info['name']){</php>
				<input type="radio" name="showindex" value="{$key}" checked/>
<php>}else{</php>
				<input type="radio" name="showindex" value="{$key}"/>
<php>}</php>
</span></li>
</volist>
					   <li><span class="tspan"><input type="text" name="action[]"></span><span><input type="text" name="description[]"></span><span><input type="radio" name="showindex" value="{$key+1}"/></span></li>
						</ul>								 
						</td>
					</tr>						
					
<style>
	.list {width:450px;list-style:none;margin:0px;padding:0px;}
	.list span{width:140px;display: inline-block;text-align:center}

</style>
<php>}else{</php>

					<tr class="top">
						<td class="border" colspan="2"></td>
					</tr>
					<tr>
						<th class="header" colspan="2">修改节点</th>
					</tr>
					<tr class="label">
						<th>说明</th>
						<th>设置</th>
					</tr>
					<tr class="cell">
						<td class="altbg1">
							<b>节点名:</b>
							<br/>
							<span class="smalltxt">后台节点</span>parameter
						</td>
						<td class="altbg2"><input name="name" class="txt" value="{$info.name}"/> </td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>显示名:</b>
							<br/>
							<span class="smalltxt">后台显示名</span>
						</td>
						<td class="altbg2"><input name="title" value="{$info.title}" class="txt"/></td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1" style="width:300px">
							<b>状态:</b>
							<br/>
							<span class="smalltxt">后台显示名</span>
						</td>
						<td class="altbg2">
							<select name="state">
								<option value="1" <eq name="info.state" value="1">selected</eq> >开启</option>
								<option value="0" <eq name="info.state" value="0">selected</eq> >关闭</option>
							</select>
						</td>
					</tr>										
	<php>if($info['type']=='guest'){</php>
							<tr class="cell">
							<td class="altbg1">
								<b>全部权限:</b>
								<br/>
								<span class="smalltxt">游客是否拥有此节点下所有的访问权限</span>
							</td>
							<td class="altbg2">
								<php>$checked = ($info['containaction']=='All')?'checked':'';</php>
								<input type="checkbox" value="All" name="containaction" {$checked}> 是								
							</td>
						</tr>
	<php>}else{</php>
					<tr class="cell">
						<td class="altbg1">
							<b>描述:</b>
							<br/>
							<span class="smalltxt">对节点的描述</span>
						</td>
						<td class="altbg2">
							<textarea cols="30" name="description" rows="5" >{$info.description}</textarea>
						</td>
					</tr>
	<php>}</php>
<php>}</php>
					<tr>
						<td class="footer" colspan="2">
							<input type="submit" class="button" value="修改" />
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			  </form>
			</table>
		</div>
		<script type="text/javascript">
			c = new ctrl('id[]');
		</script>
	</body>
</html>
